package com.dhcc.core.modules.system.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.baomidou.mybatisplus.plugins.Page;
import com.dhcc.core.framework.base.mapper.BaseMapper;
import com.dhcc.core.modules.system.entity.PanAttachment;
import com.dhcc.core.modules.system.entity.PanFile;

/**
 * 
 * 
 * @ClassName: PanFileMapper
 * @Description: TODO
 * @author mk
 * @date 2018-08-30 20:44:24
 */
public interface PanFileMapper extends BaseMapper<PanFile> {

    /**
     * 获取文件夹中的文件
     * @Title: getUserAttachmentsOfFolder 
     * @Description: TODO
     * @param page
     * @param folderId
     * @param userId
     * @param fileName
     * @param startDate
     * @param endDate
     * @return
     * @return: List<PanAttachment>
     */
    List<PanAttachment> getUserAttachmentsOfFolder(@Param("page") Page<PanAttachment> page,
            @Param("folderId") Long folderId, @Param("userId") Long userId, @Param("fileName") String fileName,
            @Param("startDate") String startDate, @Param("endDate") String endDate);

    /**
     * 文件夹下文件数
     * @Title: countFileOfFolder 
     * @Description: TODO
     * @param folderId
     * @return
     * @return: Integer
     */
    Integer countFileOfFolder(Long folderId);
    /**
     * 获取附件通过文件ID
     * @param fileIds
     * @return
     */
    List<PanAttachment> getAttachmentsByFileIds(@Param("fileIds")Long[] fileIds);
}
